package com.happy.study.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @Author: Wuzh
 * @Description: Mybatisplus分页拦截器，缺少该拦截器可能导致查询count错误
 * @Date Created in 23:57 2020/8/21
 * @return
 */
@EnableTransactionManagement (proxyTargetClass = true)
@Configuration
public class MybatisPlusConfig {
    /**
     * 分页插件
     */
    @Bean
    public PaginationInterceptor paginationInterceptor () {
        return new PaginationInterceptor ();
    }

}
